const promise = new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve("success");
  }, 1000);
});

const test = async () => {
  const result = await promise;
  console.log(result);
};

test();
